<template>
    <div id="buyerpayBail">
        <!-- 订单信息 -->
        <div class="order-box" v-if="lang=='zh' ">
            <h6  v-if="orderState == '交易关闭' ">交易关闭</h6>
            <h6 v-if="data.buyer_state == 1 && data.seller_state == 0">等待对方处理</h6>
            <h6 v-if="(data.buyer_state == 1 || data.buyer_state == 2) && data.seller_state == 1">等待对方发货</h6>
            <!-- 对方已发货，平台未发货，买方已付藏品金额 -->
            <h6 v-if="data.buyer_state ==2 && data.seller_state == 2">对方已发货</h6>
            <h6 v-if="data.seller_state == 3 ">平台已收货</h6>
            <h6 v-if="data.seller_state == 4">平台已发货</h6>
            <h6  v-if="orderState == '交易完成' ">交易完成</h6>
            <!-- <h6 v-if="data.seller_state == 8 &&  data.buyer_state == 4">交易关闭</h6> -->
            <!-- 交易关闭中    1.买家未支付保证金前提下申请关闭  2.卖家返回，申请关闭 -->
            <!-- 买家状态：0待支付保证金、1已支付保证金、2已支付藏品金额、3交易完成、4保证金已退回、5保证金没收、6已关闭、7申请关闭
            卖家状态：0待支付保证金、1已支付保证金、2已发货、3平台已验收、4平台已发货、5交易完成、6保证金已退回、7保证金没收、8拒绝售卖、9申请关闭 -->
            <h6 v-if="data.seller_state == 9  || data.buyer_state == 7 ">交易关闭中</h6>

            
           <p>订单编号：{{data.order_code}}</p>
           <p>订单时间：{{data.create_time}}</p>
        </div>
         <div class="order-box"  v-else>
            <!-- <h6 v-if="data.buyer_state == 6 || data.buyer_state == 5 || ((data.buyer_state == 0 || data.buyer_state == 1) &&  data.seller_state == 8)">Deal closed</h6> -->
            <h6  v-if="orderState == '交易关闭' ">Deal closed</h6>
            <h6 v-if="(data.buyer_state == 1 || data.buyer_state == 2) && data.seller_state == 1">>Waiting for delivery</h6>
            <h6 v-if="data.buyer_state == 1 && data.seller_state == 0">Waiting process</h6>
            <h6 v-if="data.buyer_state ==2 && data.seller_state == 2">Seller has shipped</h6>
            <h6 v-if="data.seller_state == 3 ">Platform has been received</h6>
            <h6 v-if="data.seller_state == 4">Platform has been shipped</h6>
            <!-- <h6 v-if="data.seller_state == 6 || data.buyer_state == 4 || data.seller_state == 5 ||  data.buyer_state == 3">Deal Done</h6> -->
            <h6  v-if="orderState == '交易完成' ">Deal Done</h6>

           <p>Order number：{{data.order_code}}</p>
           <p>Order time：{{data.create_time}}</p>
        </div>
        <!-- 确认信息 -->
        <div class="info-box">
            <img v-if="lang == 'zh'" src="http://img.xianyufanshen.net//goods/image/querenxinxi@2x.png" alt="">
            <img v-if="lang == 'en'" src="http://img.xianyufanshen.net//image/jpg/engquerenxinxi_eng22@2x.png" alt="">
            <div class="goods-box"  @click="goDetails(data.goods_id)">
                <div class="img-box">
                    <img :src="goodsInfo.head_img" alt="">
                    <img v-if="type == 0&&lang == 'zh'" class="label" src="http://img.xianyufanshen.net//goods/image/huanjin@2x.png" alt="">
                    <img v-if="type == 0&&lang == 'en'" class="label" src="http://img.xianyufanshen.net//image/jpg/enghuanjin_eng@2x.png" alt="">
                </div>
                <dl>
                    <dt style="display:-webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;text-overflow: ellipsis;">{{goodsInfo.title_cn}}</dt>
                    <dd>￥{{data.single_price}} <span>x{{data.purchase_num}}</span></dd>
                </dl>
            </div>
        </div>

        <!-- 物流信息 -->
        <div class="payMoney" v-if="data.seller_state == 2 ||data.seller_state == 3 || data.seller_state == 4 || data.seller_state == 6 || data.buyer_state == 4 || data.buyer_state == 3">
            <p><img v-if="lang == 'zh'" src="http://img.xianyufanshen.net//order/images/wuliuxinxi@2x.png" alt="">
                <img v-if="lang == 'en'" src="http://img.xianyufanshen.net//image/jpg/engwuliuxinxi_eng@2x.png" alt=""></p>
            <!-- bottom -->
            <ul class="bottom exp"  v-if="lang=='zh'">
                <li v-if="data.platform_express_com==''">快递公司: <span>{{data.seller_express_com}}</span></li>
                <li v-else>快递公司: <span>{{data.platform_express_com}}</span></li>
                <li v-if="data.platform_express_code==''">快递单号: <span>{{data.seller_express_code}}</span></li>
                <li v-else>快递单号: <span>{{data.platform_express_code}}</span></li>
            </ul>
            <ul class="bottom"  v-else>
                <li v-if="data.platform_express_com==''">Courier company: <span>{{data.seller_express_com}}</span></li>
                <li v-else>Courier company: <span>{{data.platform_express_com}}</span></li>
                <li  v-if="data.platform_express_code==''">tracking number: <span>{{data.seller_express_code}}</span></li>
                <li v-else>tracking number: <span>{{data.platform_express_code}}</span></li>
            </ul>
        </div>

        <!-- 申请原因 -->
        <div class="payMoney" v-if="orderState == '显示申请关闭原因' ">
            <p><img  v-if="lang == 'zh'"  src="http://img.xianyufanshen.net//order/images/shenqingyuanyin@2x.png" alt="">
                <img v-if="lang == 'en'" src="http://img.xianyufanshen.net//image/jpg/engshenqingyuanyin_eng@2x.png" alt=""></p>
            <!-- bottom -->
            <ul class="bottom"  v-if="lang=='zh' ">
                <li v-if="data.buyer_state==5 || data.buyer_state == 7">申请关闭原因： <span>{{data.buyer_cancel_reason}}</span></li>
                <li v-else>申请关闭原因： <span>{{data.seller_cancel_reason}}</span></li>
            </ul>
            <ul class="bottom"  v-else>
                <li v-if="data.buyer_state==5 || data.buyer_state == 7">Reason for closing： <span>{{data.buyer_cancel_reason}}</span></li>
                <li v-else>Reason for closing： <span>{{data.seller_cancel_reason}}</span></li>
            </ul>
        </div>

        <!-- 买家状态：0待支付保证金、1已支付保证金、2已支付藏品金额、3交易完成、4保证金已退回、5保证金没收、6已关闭、7申请关闭
            卖家状态：0待支付保证金、1已支付保证金、2已发货、3平台已验收、4平台已发货、5交易完成、6保证金已退回、7保证金没收、8拒绝售卖、9申请关闭 -->
        <!-- 保证金 -->
        <div class="payMoney" v-if="data.seller_state == 6 || data.buyer_state == 4 || data.seller_state == 5 ||  data.buyer_state == 3 ">
            <p><img class="bzj" v-if="lang == 'zh'" src="http://img.xianyufanshen.net//order/images/baozhengjin@2x.png" alt="">
                <img class="bzj" v-if="lang == 'en'" src="http://img.xianyufanshen.net//image/jpg/engbaozhengjin_eng@2x.png" alt=""></p>
            <!-- bottom -->
            <ul class="bottom paymoneybail">
                <li><i v-if="lang=='zh' ">保证金状态</i>  <i v-else>Bond status</i>
                    <!-- 已支付或者已退回 -->
                    <!-- 1.已支付保证金并且卖家没有拒绝置换  2.支付藏品金额  3.保证金已退回情况  -->
                    <span class="green" v-if="(data.buyer_state == 1&&data.seller_state !=8 )|| data.buyer_state == 2 || data.buyer_state ==4 ">{{seller_state_txt}}</span>
                    <!-- 未支付 -->
                    <span v-if="data.buyer_state ==0 " class="red">{{seller_state_txt}}</span>
                    <!-- 冻结中、已没收 -->
                    <!-- 1.交易完成，保证金未退回状态都是冻结中  2.保证金没收   3.作为过错方申请关闭  4.卖家为过错方  交易申请关闭中 -->
                    <span class="red" v-if="data.buyer_state == 3 || data.buyer_state == 5 || data.buyer_state ==7  
                    || (data.buyer_state ==6&&(data.seller_state == 7 || data.seller_state == 9))
                     || (data.buyer_state == 1&& data.seller_state ==8)">{{seller_state_txt}}</span>
                </li>
            </ul>
        </div>
         <!-- 底部提示 -->
        <div class="tip"  v-if="data.seller_state == 6 || data.buyer_state == 4 || data.seller_state == 5 ||  data.buyer_state == 3" >
            <i></i><span v-if="lang=='zh' ">保证金会在1~3个工作日原路返回，请注意查收</span>
            <span v-else>The deposit will be returned on the original road within 1~3 working days. Please pay attention to check</span>
        </div>

        <!-- 确认收货 -->
        <div class="btn-box confirm" v-if="data.seller_state == 4 &&lang=='zh' " @click="confirm">确认收货</div>
        <div class="btn-box confirm" v-if="data.seller_state == 4 &&lang=='en' "  @click="confirm" >confirm</div>


        <!-- 删除订单 -->
        <div class="btn-box" v-if="(isDelte == '1'  || isDelte == 1) &&lang=='zh' " @click="delOrder">删除订单</div>
        <div class="btn-box" v-if="(isDelte == '1' || isDelte == 1) &&lang=='en' "  @click="delOrder" >Delete order</div>
        <!-- loading -->
        <div class="loading-box" v-show="loading">
             <van-loading type="spinner" color="white" />
        </div>
    </div>
</template>
<script>
import {getAccountInfo,} from '@/api/my/userInfo'
import { getmyPurchaseDetail ,postmyPurchaseFinish,postmyPurchaseDeleteOrder} from '@/api/my/myBuy'
import { Loading,Toast,Cell, CellGroup ,RadioGroup, Radio,Dialog} from 'vant';
export default {
    name:'buyerorderClose',
    //声明组件
    components:{
        [Loading.name]:Loading,
        [Radio.name]:Radio,
        [RadioGroup.name]:RadioGroup,
        [Cell.name]:Cell,
        [CellGroup.name]:CellGroup,
        [Toast.name]:Toast,
        [Dialog.name]:Dialog,
    },
    data (){
        return{
            lang:'zh',//当前网页语言类型 zh 中文  en 英语  
            id:0,//当前订单id
            type:1,//选择商品类型 1购买 0置换
            userId:0,//用户id 
            data:{},//详情数据 
            goodsInfo:{},//商品相关数据
            radio:'3',//支付方式:1余额，2支付宝，3微信
            balance:0,//我的余额
            myBalance:'',//我的余额描述
            totalPrice:'',//购买的总价格
            loading:false,//加载提示框 是否显示(页面初始加载显示)
            isSelected:false,//是否选择了置换的商品
            seller_state_txt:'',//保证金退回进度
            isDelte:0,//是否可以删除 即是否显示删除按钮
            orderState:'',//当前订单状态 根据状态显示不同的场景 ！！！
        }
    },
    //实例创建完成后被立即调用
    created (){
        //获得语言类型lang
        if(this.$route.query.lang) {
            this.lang = this.$route.query.lang;
        }
        //获取订单id
        if(this.$route.query.id && this.$route.query.id > 0){
            this.id = this.$route.query.id;
             //请求数据
             this.getAllData();
        }else{
            if(this.lang == 'zh')
                Toast('获得订单ID失败，请返回列表页重试'); 
            else
                Toast('The order ID failed. Please return to the list page to try again.');
            this.loading = false;
        }
        //获取用户id
        if(this.$route.query.userId && this.$route.query.userId > 0){
            this.userId = this.$route.query.userId;
             //把用户id存储在缓存
             window.localStorage.setItem("userId",this.userId);
        }else{
            this.userId = window.localStorage.getItem("userId");
        }
        this.getUserInfo();
    },
    //监听
    watch:{

    },
    //计算属性
    computed:{

    },
    //
    methods:{
         //主要是余额
        getUserInfo(){
            getAccountInfo(this.userId).then(res => {
                // console.log(res);
                if(res.code == 200){
                    this.balance = parseFloat(res.data.balance);//钱包余额
                    this.balance =  this.balance.toFixed(2);//钱包余额
                    // console.log(this.balance);
                    if(this.lang == 'zh'){
                        this.myBalance = '我的余额  (剩余￥'+this.balance+')';
                    }else{
                        this.myBalance = 'My balance  (rest￥'+this.balance+')';
                    }
                }
            });
        },
         //获得所有详情数据
        getAllData(){
            getmyPurchaseDetail(this.id,this.lang).then(res => {
                console.log('res',res);
                if(res.code == 200){
                    this.data = res.data;
                    this.goodsInfo = this.data.goodsInfo;
                    this.totalPrice = this.data.seller_bond;


                    if(this.data.buyer_state == 0){
                        if(this.lang == 'zh'){
                            this.seller_state_txt = "未支付";
                        }else{
                            this.seller_state_txt = "Unpaid";
                        }
                    }
                    else if((this.data.buyer_state == 1 || this.data.buyer_state == 2 ) && (this.data.seller_state< 5)){
                        if(this.lang == 'zh'){
                            this.seller_state_txt = "已支付";
                        }else{
                            this.seller_state_txt = "Paid";
                        }
                    }
                    else if(this.data.buyer_state == 5){
                        if(this.lang == 'zh'){
                            this.seller_state_txt = "已没收";
                        }else{
                            this.seller_state_txt = "Confiscated";
                        }
                    }
                    else if(this.data.buyer_state == 4 ){
                        if(this.lang == 'zh'){
                            this.seller_state_txt = "已退回";
                        }else{
                            this.seller_state_txt = "Returned";
                        }
                    }    
                    else if(this.data.buyer_state == 6 && (this.data.seller_state == 8 || this.data.seller_state == 0)){
                        if(this.lang == 'zh'){
                            this.seller_state_txt = "未支付";
                        }else{
                            this.seller_state_txt = "Unpaid";
                        }
                    }
                    else if(this.data.buyer_state == 3 || (this.data.buyer_state ==1 && (this.data.seller_state ==8 || this.data.seller_state ==9))){
                        if(this.lang =='zh'){
                            this.seller_state_txt = "冻结中";
                        }else{
                            this.seller_state_txt = "Freezing";
                        }
                    }

                    // if(this.lang == 'zh'){
                    //     if(this.data.buyer_state == 0 ){
                    //         this.seller_state_txt = "未支付";
                    //     }
                    //     if(this.data.buyer_state == 1 || this.data.buyer_state == 2 ){
                    //         this.seller_state_txt = "已支付";
                    //     }
                    //     if(this.data.buyer_state == 5){
                    //         this.seller_state_txt = "已没收";
                    //     }
                    //     if(this.data.buyer_state == 4 ){
                    //         this.seller_state_txt = "已退回";
                    //     }    
                    //     if(this.data.buyer_state == 3 ){
                    //         this.seller_state_txt = "冻结中";
                    //     } 
                    //     if(this.data.buyer_state == 6 && this.data.seller_state == 0){
                    //         this.seller_state_txt = "已退回";
                    //     }
                    //     if(this.data.seller_state == 5 && this.data.buyer_state == 3){
                    //         this.seller_state_txt = "冻结中"; 
                    //     }
                        
                    // }else{
                    //     if(this.data.buyer_state == 0 ){
                    //         this.seller_state_txt = "Unpaid";
                    //     }
                    //     if(this.data.buyer_state == 1 || this.data.buyer_state == 2 ){
                    //         this.seller_state_txt = "Paid";
                    //     }
                    //     if(this.data.buyer_state == 5){
                    //         this.seller_state_txt = "Confiscated";
                    //     }
                    //     if(this.data.buyer_state == 4 ){
                    //         this.seller_state_txt = "Returned";
                    //     }  
                    //     if(this.data.buyer_state == 3 ){
                    //         this.seller_state_txt = "freezing";
                    //     }   
                    //     if(this.data.buyer_state == 6 && this.data.seller_state == 0){
                    //         this.seller_state_txt = "Returned";
                    //     }
                    //     if(this.data.seller_state == 5 && this.data.buyer_state == 3){
                    //         this.seller_state_txt = "freezing"; 
                    //     }
                    // }
            // 买家状态：0待支付保证金、1已支付保证金、2已支付藏品金额、3交易完成、4保证金已退回、5保证金没收、6已关闭、7申请关闭
            // 卖家状态：0待支付保证金、1已支付保证金、2已发货、3平台已验收、4平台已发货、5交易完成、6保证金已退回、7保证金没收、8拒绝售卖、9申请关闭
                    //根据双方状态判断订单状态 交易完成 交易关闭 关闭中 ...
                    if(this.data.buyer_state ==6 &&  this.data.seller_state == 0){//买方没交保证金返回关闭
                        this.orderState = "交易关闭";
                        this.isDelte = 1;
                    }else if(this.buyer_state == 1 && this.data.seller_state == 8){
                        //买家已支付保证金  卖家售卖
                        this.orderState = "交易关闭";

                    }else if(this.data.buyer_state >4 || this.data.seller_state >6){//交易关闭
                        if(this.data.seller_state == 8){//对方拒绝售卖 没有原因 可以删除
                           this.orderState = "交易关闭";
                           this.isDelte = 1;
                        }else{
                           this.orderState = "显示申请关闭原因";
                        }
                        if(this.data.seller_state == 6 && this.data.buyer_state == 4){//保证金已退回
                            this.isDelte = 1;
                        }
                        if(this.data.seller_state == 0 &&  this.data.buyer_state == 0){//都没付钱
                            this.isDelte = 1;
                        }
                     }else if(this.data.buyer_state == 3 || this.data.seller_state == 5){//交易完成
                         this.orderState = "交易完成";
                     }else if(this.data.buyer_state == 4){//保证金退回
                         this.orderState = "交易完成";
                        if(this.data.seller_state == 6 && this.data.buyer_state == 4){//交易完成 保证金已退回
                         this.isDelte = 1;
                        }
                     }else if(this.data.seller_state == 6){//保证金退回
                         this.orderState = "交易完成";
                        if(this.data.seller_state == 6 && this.data.buyer_state == 4){//交易完成 保证金已退回
                         this.isDelte = 1;
                        }
                     } else if(this.data.seller_state == 6 && this.data.buyer_state == 4){//交易完成 保证金已退回
                         this.isDelte = 1;
                     }else{}
                    // if(this.data.seller_state == 0 &&  this.data.buyer_state == 0){//都没付钱
                    //         this.isDelte = 1;
                    // }
                    console.log(  this.isDelte,'data',this.seller_state_txt)    
                }else {
                    if(this.lang == 'zh')
                        Toast('获取详情失败，请稍后再试~');
                    else
                        Toast('Failed to get details. Please try again later. ');
                    }
                })
               
        },
        //删除订单
        delOrder(){
            postmyPurchaseDeleteOrder(this.id,this.lang).then(res => {
                if(res.code == 200){
                    //隐藏加载中
                    this.load = false; 
                    var para = {}; 
                    var message = '';
                    var confirm = '确认';
                    var cancel = '删除';
                    if(this.lang == 'zh'){
                        message ="确定将该订单永久删除？";
                        para.title = "我的购买";
                    }else {
                        message ="Confirm that the order will be permanently deleted ?";
                        para.title = "my purchase";
                        confirm = 'confirm';
                        cancel = 'cancel'
                    }
                    Dialog.confirm({
                        title: '',
                        message: message,
                        confirmButtonText:confirm,
                        cancelButtonText:cancel
                    }).then(() => {
                    // on confirm
                    //跳转到我的购买
                        para.lang = this.lang;//显示网页语言类型 zh中文 en英文
                        para.url = "/myBuy?userId"+this.userId+"&lang="+this.lang+"&status=1";  //status  1购买入口   0置换入口 
                        this.interaction.hLink(para);
                    }).catch(() => {
                    // on cancel
                    });
                }else{
                    Toast(res.msg);
                }
        })
        },
        //确认收货
        confirm(){
            postmyPurchaseFinish(this.id,this.lang).then(res => {
                if(res.code == 200){
                    //隐藏加载中
                    this.load = false;  
                    //跳转到拒绝反馈页面
                    let para = {};
                    if(this.lang ='zh'){
                        para.title = "收货成功";
                    }else {
                        para.title = "Delivery success";
                    }
                    para.lang = this.lang;//显示网页语言类型 zh中文 en英文
                    para.url = "/myorderSuccess?type=8&userId"+this.userId+"&lang="+this.lang+"&status=1";  //status  1购买入口   0置换入口 
                    this.interaction.hLink(para);
                }else{
                    Toast(res.msg);
                }
        })
            
        },
        // 跳转到商品详情
        goDetails(id){
            let para = {};
            para.id = id;//藏品详情id (返回首页 此参数没有)
            para.linkType = "goodsDetail";
            para.lang = this.lang;//显示网页语言类型 zh中文 en英文
           console.log(para)
            this.interaction.hLinkToApp(para);
        },
    }
    
}
</script>

<style lang="stylus" scoped>
#buyerpayBail{
    height:100%;
}
// 订单顶部信息
.order-box{
   padding :.4rem .266667rem; 
   height:2.666667rem;
   background :url("http://img.xianyufanshen.net//order/images/beijing_dingdanxiangqing@2x.png") no-repeat;
   background-size:100% 100%;
   box-sizing :border-box;
   h6{
       font-family:PingFangSC-Medium;
        font-size:.4rem;
        color:#cb9c57;
        letter-spacing:.0112rem;
        text-align:left;
        line-height :.533333rem;
        
   }
   p{   
       font-family:PingFangSC-Regular;
        font-size:.346667rem;
        color:#cb9c57;
        letter-spacing:.0096rem;
        text-align:left;
        line-height :.533333rem;
        margin-top :.16rem;
   }
}
// 确认信息
.info-box{
    background-color :#fff;
    text-align:center;
    img{
        width :2.96rem;
        height :auto;
        margin .266667rem auto;
    }
    .goods-box{
        background:#fafafa;
        padding :.266667rem;
        overflow:hidden;
        .img-box{
            width :2.133333rem;
            height :2.133333rem;
            float:left;
            position:relative;
            img{
                width :100%;
                height:100%;
                margin :0;
            }
            img.label{
                width :1.093333rem;
                height :auto;
                position:absolute;
                left 0;
                top :0;
            }
        }
        dl{
            float:left;
            width :73%;
            margin-left :3.3%
            position :relative;
            height: 2.133333rem;
            dt{
                font-family:PingFangSC-Regular;
                font-size:.373333rem;
                color:#494949;
                letter-spacing:.008rem;
                line-height:.533333rem;
                text-align:left;
            }
            dd{
                position:absolute;
                bottom :0;   
                font-family:PingFangSC-Medium;
                font-size:13px;
                color:#cb9c57;
                letter-spacing:0;
                text-align:left;
                width :100%;
               
                span{
                    font-family:PingFangSC-Regular;
                    font-size:.346667rem;
                    color:#2d2d2d;
                    letter-spacing:0;
                    text-align:right;
                    position:absolute;
                    right :0;
                }             
            }
        }
    }
    .sold-box{
        margin-top :.133333rem;
    }
    //选择互换商品操作盒子区
    .handle-box{
        font-family:PingFangSC-Regular;
        font-size:.373333rem;
        color:#eb3148;
        line-height:.533333rem;
        text-align:left;
      
        padding: 0 .266667rem;
        .click-box{
            position: relative;
            height :1.066667rem;
            line-height :1.066667rem;
            span{
                 color:red;
            }
            img.arow{
                height :.32rem;
                width :auto;
                position :absolute;
                right :0;
                top: 50%;
                margin-top :-0.16rem;
            }
        }
        .selected{
            text-align :center;
            img{    
                height :.533333rem;
                width :auto;
            }
        }
      
    }
}
// 物流信息
.payMoney{
    background-color :#fff;
    margin-top :.186667rem;
    padding-top :.13333rem;
    p{
        text-align :center;
        img{
            width: 2.96rem;
            height: auto;
           &.bzj{
               width :2.586667rem;
           } 
        }
    }   
    .paymoneybail{
        span{
            float:right;
        }
    } 
   .bottom{
       overflow :hidden;
       font-family:PingFangSC-Regular;
       font-size:.373333rem;
       color:#494949;
        line-height:20px;
       &.exp{
          li{
              span{
                  float:right;
              }
          }  
       }
       li{
           padding :0 .266667rem;
           height :1.066667rem;
           line-height:1.066667rem;
           border-bottom :1px solid #f1f1f1;
           span{
                float:right;
               &.yue{
                   color:#9b9b9b;
               }
               &.money{
                   color:#cb9c57;
               }
               &.green{
                   color:#58a701;
               }
                &.red{
                   color:#d84053;
               }
           }
       }
       li:last-child{
           
       }
   }
}
//提示
.tip{
    padding :0 .266667rem  0 .746667rem;
    margin-top:.266667rem;
    margin-bottom: 1.6rem;
    position:relative;
    font-family:PingFangSC-Regular;
    font-size:.32rem;
    color:#a2a2a2;
    letter-spacing:.008rem;
    i{
      width :.32rem;
      height :.32rem;
      position :absolute;
      left :.266667rem;
      top:50%;
      margin-top :-0.16rem;
      background :url("http://img.xianyufanshen.net//order/images/tishi_woyaofahuo@2x.png") no-repeat;
      background-size :100%;  
    }
} 
// 底部操作按钮
.btn-box{
    position :fixed;
    left 0;
    bottom:0;
    opacity:0.9;
    background:#ffffff;
    box-shadow:0 0 8px 0 rgba(0,0,0,0.08);
    width:100%;
    height :1.2rem;
    line-height :1.2rem;
    font-family:PingFangSC-Medium;
    font-size:.4rem;
    color:#d84053;
    letter-spacing:.005067rem;
    box-sizing :border-box;
    z-index: 999;
    text-align :center;
}
//确认收货
.confirm{
    color:#cb9c57;
}
.loading-box{
    width :50px;
    height :50px;
    border-radius :3px;
    background :rgba(0,0,0,.5);
    position :fixed;
    left :50%;
    top:50%;
    margin-left:-25px;
    margin-top :-25px;
    z-index :999999;
    text-align :center;
    vertical-align :middle;
    .van-loading{
       left :50%;
       top:50%;
       margin-left :-15px;
       margin-top :-15px;
    }
}
</style>


